/**  

* @Title: Admin.java 

* @Package com.gxbadge.model 

* @Description: TODO(用一句话描述该文件做什么) 

* @author CST

* @version V1.0  

*/ 

package com.gxbadge.model;

import java.io.Serializable;
import java.sql.Timestamp;

public class Administrator implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6662066555856905163L;
	private Integer adminId;
	private String name;
	private String realname;
	private String password;
	private Timestamp lastLoginDate;
	private String phone;
	private String email;
	private String note;
	private Boolean permState;
	public Integer getAdminId() {
		return adminId;
	}
	public void setAdminId(Integer adminId) {
		this.adminId = adminId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Timestamp getLastLoginDate() {
		return lastLoginDate;
	}
	public void setLastLoginDate(Timestamp lastLoginDate) {
		this.lastLoginDate = lastLoginDate;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	public String getRealname() {
		return realname;
	}
	public void setRealname(String realname) {
		this.realname = realname;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	public Boolean getPermState() {
		return permState;
	}
	public void setPermState(Boolean permState) {
		this.permState = permState;
	}
	public Administrator(){
		
	}
	
	public Administrator(Integer adminId, String name, String realname, String password,
			Timestamp lastLoginDate, String phone, String email, String note, Boolean permState) {
		super();
		this.adminId = adminId;
		this.name = name;
		this.realname = realname;
		this.password = password;
		this.lastLoginDate = lastLoginDate;
		this.phone = phone;
		this.email = email;
		this.note = note;
		this.permState = permState;
	}
	public boolean equals(Object obj){
		if (this == obj){
			return true;
		}
		if (obj != null && obj.getClass() == Administrator.class){
			Administrator admin = (Administrator)obj;
			return this.getName().equals(admin.getName()) && this.getPassword().equals(admin.getPassword());
		}
		return false;
	}
	
	public int hashCode(){
		
		return name.hashCode() + password.hashCode() * 17;
		
	}
	
	public String toString(){
		
		return this.getName().toString()+this.getPassword().toString()+this.getEmail().toString();

	}
	
}
